package com.ruoyi.bussiness.mapper;

import com.ruoyi.bussiness.domain.BridgeNum;
import com.ruoyi.bussiness.domain.SysBusinessCheckList;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 清单Mapper接口
 * 
 * @author ruoyi
 * @date 2023-12-14
 */
public interface SysBusinessCheckListMapper 
{
    /**
     * 查询清单
     * @param checkListId 清单主键
     * @return 清单
     */
    public SysBusinessCheckList selectSysBusinessCheckListByCheckListId(Long checkListId);

    /**
     * 查询清单列表
     * @param sysBusinessCheckList 清单
     * @return 清单集合
     */
    public List<SysBusinessCheckList> selectSysBusinessCheckListList(SysBusinessCheckList sysBusinessCheckList);

    /**
     * 新增清单
     * @param sysBusinessCheckList 清单
     * @return 结果
     */
    public int insertSysBusinessCheckList(SysBusinessCheckList sysBusinessCheckList);

    /**
     * 修改清单
     * @param sysBusinessCheckList 清单
     * @return 结果
     */
    public int updateSysBusinessCheckList(SysBusinessCheckList sysBusinessCheckList);

    /**
     * 删除清单
     * @param checkListId 清单主键
     * @return 结果
     */
    public int deleteSysBusinessCheckListByCheckListId(Long checkListId);

    /**
     * 批量删除清单
     * @param checkListIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysBusinessCheckListByCheckListIds(Long[] checkListIds);

    /**
     * @Author shining
     * @Description //TODO 批量撤回清单
     * @Date 09:48 2023/12/19
     **/
    int withdrawBusinessCheckListByCheckListIds(Long[] checkListIds);

    /**
     * @Author shining
     * @Description //TODO 更新 清单的OrderNo
     * @Date 11:35 2023/12/19
     **/
    int updateListOrderNum(@Param(value = "checkListId") Long checkListId);
    
    /**
     * @Author shining
     * @Description //TODO 获取上一个清单 
     * @Date 17:24 2023/12/19
     **/
    SysBusinessCheckList getLastList(@Param(value = "orderNum") Integer orderNum);

    /**
     * @Author shining
     * @Description //TODO 获取下一个清单
     * @Date 17:26 2023/12/19
     **/
    SysBusinessCheckList getNextList(@Param(value = "orderNum") Integer orderNum);


     String getMaxCheckListID(@Param("bridgeType") String bridgeType);


     /**
      * @Author shining
      * @Description  获取收录桥梁总数
      * @Date 16:41 2024/1/17
      **/
     int getCountBridge();

     /**
      * @Author shining
      * @Description 获取 古代桥梁数量
      * @Date 16:41 2024/1/17
      **/
    int getCountOldBridge();

    /***
     * @Author shining
     * @Description // 获取 现代桥梁数量
     * @Date 16:45 2024/1/17
     **/
    int getCountXdBridge();


    List<BridgeNum> getNumGroupByCounty();


}
